import request from '@/utils/request'
import { ReviewInfo, TargetValue } from './data'
import { PromiseData } from '@/@types/request'
import { IPressure } from '@/@types/common'

// 查询指标
export const getTargetValue = (data: {
  dataId: number
  variableValueDtos: { id?: number; variableId: string; variableValue: string }[]
}): Promise<PromiseData<TargetValue>> => request.post('/dataReport/getTargetValue', data)

// 查询变量数据
export const getDataTaskDetail = (data: { dataId: number }): Promise<PromiseData<ReviewInfo>> =>
  request.post('/dataReport/getDataTaskDetail', data)

// 获取事件内容
export const getInjuryInformation = (data: { dataId: number }): Promise<PromiseData<IPressure[]>> =>
  request.post('/dataReport/getInjuryInformation', data)
